﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class SectionFacade
    {
        public string Save(Section sections)
        {
            SectionController cont = new SectionController();
            return cont.Save(sections);
        }

        public string Delete(Section sections)
        {
            SectionController cont = new SectionController();
            return cont.Delete(sections);
        }

        public string BeforeDelete(Section sections)
        {
            SectionController cont = new SectionController();
            return cont.BeforeDelete(sections);
        }

        public IList<Section> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData, int BusinessGroupID)
        {
            IList<Section> sections = new List<Section>();
            SectionController cont = new SectionController();
            sections = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData, BusinessGroupID);
            return sections;
        }

        public IList<Section> GetAllSectionByDepartmentID(string sSearch, int DepartmentID, int PageNumber, int DataLength, int SortCol, string SortDirection, out int TotalData)
        {
            IList<Section> sections = new List<Section>();
            SectionController cont = new SectionController();
            sections = cont.GetAllSectionByDepartmentID(sSearch, DepartmentID, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return sections;
        }

        public Section GetSectionByID(int ID)
        {
            Section sections = new Section();
            SectionController cont = new SectionController();
            sections = cont.GetSectionByID(ID);
            return sections;
        }

        public Section GetSectionByDescription(string SectionDescription)
        {
            Section sections = new Section();
            SectionController cont = new SectionController();
            sections = cont.GetSectionByDescription(SectionDescription);
            return sections;
        }
    }
}